package com.ktg.web.user;

import com.ktg.ktgcommon.domain.user.SysUser;
import com.ktg.ktgcommon.result.R;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @GetMapping("/api/user/info")
    public R loginInfo(Authentication authentication){
        SysUser sysUser=(SysUser) authentication.getPrincipal();
        return R.OK(sysUser);
    }
    @GetMapping(value = "/api/login/free")
    public R freeLogin(){
        return R.OK();
    }
}
